home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Just Call Me Internet
/
Just Call Me Internet.iso
/
prog
/
atari
/
m2
/
cat3src
/
magic
/
d
/
magicvdi.d
< prev
next >
Wrap
Text File
|
1997-10-26
|
21KB
|
615 lines
(*----------------------------------------------------------------------*
* *
* MAGIC Modula's All purpose GEM Interface Cadre *
* ÿ ÿ ÿ ÿ ÿ *
*----------------------------------------------------------------------*
* Version 3.30 02.02.1992 (C)90/91/92 by Peter Hellinger Software *
*----------------------------------------------------------------------*
* Dieses Modul ist urheberrechtlich geschtzt. *
* *
* Die Verffentlichung des Quelltextes oder Teilen daraus in schrift- *
* licher Form, insbesondere in Zeitschriften, sowie die Verbreitung *
* ber Public-Domain-Hndler bedarf der ausdrcklichen schriftlichen *
* Genehmigung des Autors! *
* *
* Der Autor gibt hiermit die ausdrckliche Erlaubnis, das Modul jeder- *
* zeit auch im Quelltext weiterzugegeben, sofern dessen Text und ins- *
* besondere dieser Urheberrechts-Vermerk nicht verndert wird, und *
* durch die Weitergabe kein finanzieller Nutzen entsteht. Der Autor *
* behlt sich das Recht vor, diese Erlaubnis jederzeit u. ohne Angaben *
* von Grnden zu widerrufen. *
*----------------------------------------------------------------------*)
(*----------------------------------------------------------------------*
* MagicVDI Virtual Device Interface Modula-2 Interface *
*----------------------------------------------------------------------*)
DEFINITION MODULE MagicVDI;
FROM MagicSys IMPORT Nil, Null, Bit0, Bit1, Bit2, Bit3, Bit4, Bit5, Bit6,
Bit7, Bit8, Bit9, Bit10, Bit11, Bit12, Bit13, Bit14,
Bit15, LOC, Byte, ByteSet, sWORD, sINTEGER, sCARDINAL,
sBITSET, lINTEGER, lCARDINAL, lWORD, lBITSET;
IMPORT SYSTEM;
(*-- VDI-Parameter ---------------------------------------------------*)
TYPE tWorkIn = ARRAY [0..10] OF sINTEGER;
tWorkOut = ARRAY [0..57] OF sINTEGER;
tPxyArray = ARRAY [0..3] OF sINTEGER;
tBigPxyArray = ARRAY [0..7] OF sINTEGER;
tMouseArray = ARRAY [0..38] OF sINTEGER;
tSmallArray = ARRAY [0..1] OF sINTEGER;
tRGBArray = ARRAY [0..2] OF sINTEGER;
tTextAttrArray = ARRAY [0..9] OF sINTEGER;
tFontName = ARRAY [0..31] OF CHAR;
tDistanceArray = ARRAY [0..4] OF sINTEGER;
tFilmName = ARRAY [0..124] OF CHAR;
tFilmIndex = ARRAY [0..7],[0..1] OF sINTEGER;
tCtrlArray = ARRAY [0..512] OF sINTEGER;
VAR VDIControl: ARRAY [0..11] OF sINTEGER;
VDIIntIn: tCtrlArray;
VDIPtsIn: tCtrlArray;
VDIIntOut: tCtrlArray;
VDIPtsOut: tCtrlArray;
VAR VDIPB: RECORD
control: POINTER TO ARRAY [0..11] OF sINTEGER;
intin: POINTER TO tCtrlArray;
ptsin: POINTER TO tCtrlArray;
intout: POINTER TO tCtrlArray;
ptsout: POINTER TO tCtrlArray;
END;
PROCEDURE VDICall (ctrl0, ctrl1, ctrl3, ctrl5, ctrl6: sINTEGER);
CONST NoGdos = 0FFFFFFFEH; (* Kein GDOS isntalliert *)
Gdos = 00007E88AH; (* GDOS 1.1 von Atari Corp. *)
AMCGdos = 00007E864H; (* AMCGDos von Arnd Beissner *)
AMCLight = 00007E8BAH; (* GEMINI-Spezial-GDos von Arnd Beissner *)
NVDI = 000000000H; (* NVDI von Bela GmbH *)
PROCEDURE VqGdos(): lCARDINAL;
(* Achtung, das ABC-GEM (GEM 2.1) schmiert bei dieser Funktion ab!!! *)
(*-- VDI-Attrib ------------------------------------------------------*)
CONST REPLACE = 1; (* Schreibmodi *)
TRANSPARENT = 2;
XOR = 3;
REVTRANSPARENT = 4;
ALL_WHITE = 0;
S_AND_D = 1;
S_AND_NOTD = 2;
S_ONLY = 3;
NOTS_AND_D = 4;
D_ONLY = 5;
S_XOR_D = 6;
S_OR_D = 7;
NOT_SORD = 8;
NOT_SXORD = 9;
D_INVERT = 10;
NOT_D = 11;
S_OR_NOTD = 12;
NOTS_OR_D = 13;
NOT_SANDD = 14;
ALL_BLACK = 15;
PROCEDURE SetWritemode (handle, mode: sINTEGER): sINTEGER;
(* vswr_mode *)
PROCEDURE SetColor (handle, index: sINTEGER; VAR rgb: ARRAY OF LOC);
(* vs_color *)
CONST Line = 1; (* Linienstile *)
LongDash = 2;
Dot = 3;
DashDot = 4;
Dash = 5;
DashDotDot = 6;
User = 7;
PROCEDURE SetLinetype (handle, type: sINTEGER): sINTEGER;
(* vsl_type *)
PROCEDURE SetUserlinestyle (handle: sINTEGER; REF style: ARRAY OF LOC);
(* vsl_udsty *)
PROCEDURE SetLinewidth (handle, width: sINTEGER): sINTEGER;
(* vsl_width *)
PROCEDURE SetLinecolor (handle, color: sINTEGER): sINTEGER;
(* vsl_color *)
CONST Cornerd = 0; (* Linien-Endtypen *)
Arrow = 1;
Rounded = 2;
PROCEDURE SetLineEndstyles (handle, begin, end: sINTEGER);
(* vsl_ends *)
CONST Point = 1; (* Markertypen *)
Plus = 2;
Star = 3;
Square = 4;
Cross = 5;
Diamond = 6;
PROCEDURE SetMarkertype (handle, type: sINTEGER): sINTEGER;
(* vsm_type *)
PROCEDURE SetMarkerheight (handle, height: sINTEGER): sINTEGER;
(* vsm_height *)
PROCEDURE SetMarkercolor (handle, index: sINTEGER): sINTEGER;
(* vsm_color *)
PROCEDURE SetCharheight (handle, h: sINTEGER; VAR ch, cw, bh, bw: sINTEGER);
(* vst_height *)
PROCEDURE SetCharpoints (handle, h: sINTEGER; VAR ch, cw, bh, bw: sINTEGER): sINTEGER;
(* vst_point *)
PROCEDURE SetCharbaseline (handle, angle: sINTEGER): sINTEGER;
(* vst_rotation *)
PROCEDURE SetTextface (handle, font: sINTEGER): sINTEGER;
(* vst_font *)
PROCEDURE SetTextcolor (handle, index: sINTEGER): sINTEGER;
(* vst_color *)
CONST Fat = Bit0; (* Text-Effekte *)
Light = Bit1;
Italic = Bit2;
Underline = Bit3;
Outline = Bit4;
Shadowed = Bit5;
PROCEDURE SetTexteffect (handle: sINTEGER; effect: sBITSET): sBITSET;
(* vst_effects *)
CONST LeftJust = 0;
Centerd = 1;
RightJust = 2;
CONST BaseJust = 0;
HalfJust = 1;
AscentJust = 2;
BottomJust = 3;
DescentJust = 4;
TopJust = 5;
PROCEDURE SetTextalignment (handle, hin, vin: sINTEGER; VAR hout, vout: sINTEGER);
(* vst_alignment *)
CONST None = 0; (* Flltypen *)
Full = 1;
Pattern = 2;
Hatch = 3;
UserFill = 4;
PROCEDURE SetFillinterior (handle: sINTEGER; index: sINTEGER): sINTEGER;
(* vsf_interior *)
PROCEDURE SetFillstyle (handle, style: sINTEGER): sINTEGER;
(* vsf_style *)
PROCEDURE SetFillcolor (handle, index: sINTEGER): sINTEGER;
(* vsf_color *)
PROCEDURE SetFillperimeter (handle: sINTEGER; border: BOOLEAN): BOOLEAN;
(* vsf_perimeter *)
PROCEDURE SetUserfillpattern (handle: sINTEGER; VAR pat: ARRAY OF LOC;
planes: sINTEGER);
(* vs_udpat *)
(*-- VDI-Control -----------------------------------------------------*)
PROCEDURE OpenWorkstation (VAR in: ARRAY OF LOC;
VAR handle: sINTEGER;
VAR out: ARRAY OF LOC);
(* v_opnwk *)
PROCEDURE CloseWorkstation (handle: sINTEGER);
(* v_clswk *)
PROCEDURE OpenVirtual (VAR in: ARRAY OF LOC;
VAR handle: sINTEGER;
VAR out: ARRAY OF LOC);
(* v_opnvwk *)
PROCEDURE CloseVirtual (handle: sINTEGER);
(* v_clsvwk *)
PROCEDURE ClearWorkstation (handle: sINTEGER);
(* v_clrwk *)
PROCEDURE UpdateWorkstation (handle: sINTEGER);
(* v_updwk *)
PROCEDURE LoadFonts (handle, select: sINTEGER): sINTEGER;
(* vst_load_fonts *)
PROCEDURE UnloadFonts (handle, select: sINTEGER);
(* vst_unload_fonts *)
PROCEDURE SetClipping (handle: sINTEGER; VAR rect: ARRAY OF LOC; do: BOOLEAN);
(* vs_clip *)
(*-- VDI-Escape ------------------------------------------------------*)
PROCEDURE InqCharcells (handle: sINTEGER; VAR rows, colums: sINTEGER);
(* vq_chcells *)
PROCEDURE ExitAlphamode (handle: sINTEGER);
(* v_exit_cur *)
PROCEDURE EnterAlphamode (handle: sINTEGER);
(* v_enter_cur *)
PROCEDURE AcursorUp (handle: sINTEGER);
(* v_curup *)
PROCEDURE AcursorDown (handle: sINTEGER);
(* v_curdown *)
PROCEDURE AcursorRight (handle : sINTEGER);
(* v_curright *)
PROCEDURE AcursorLeft (handle: sINTEGER);
(* v_curleft *)
PROCEDURE HomeAcursor (handle: sINTEGER);
(* v_curhome *)
PROCEDURE EraseEOS (handle: sINTEGER);
(* v_eeos *)
(* EOS = End of screen *)
PROCEDURE EraseEOL (handle: sINTEGER);
(* v_eeol *)
(* EOL = End of line *)
PROCEDURE AcursorAddress (handle, row, column: sINTEGER);
(* v_curaddress *)
PROCEDURE CursorText (handle: sINTEGER; REF string: ARRAY OF CHAR);
(* v_curtext *)
PROCEDURE ReverseVideoOn (handle: sINTEGER);
(* v_rvon *)
PROCEDURE ReverseVideoOff (handle: sINTEGER);
(* v_rvoff *)
PROCEDURE InqCursoraddress (handle: sINTEGER; VAR row, column: sINTEGER);
(* vq_curaddress *)
PROCEDURE InqTabletstatus (handle: sINTEGER): sINTEGER;
(* vq_tabstatus *)
PROCEDURE Hardcopy (handle: sINTEGER);
(* v_hardcopy *)
PROCEDURE DisplayCursor (handle, x, y: sINTEGER);
(* v_dspcur *)
PROCEDURE RemoveCursor (handle: sINTEGER);
(* v_rmcur *)
PROCEDURE FormAdvance (handle: sINTEGER);
(* v_form_adv *)
PROCEDURE OutputWindow (handle: sINTEGER; VAR pxy: ARRAY OF LOC);
(* v_output_window *)
PROCEDURE ClearDisplaylist (handle: sINTEGER);
(* v_clear_disp_list *)
PROCEDURE Bitimagefile (handle: sINTEGER; REF fileName: ARRAY OF CHAR;
aspect, scaling, numPts: sINTEGER;
VAR pxy: ARRAY OF LOC);
(* v_bit_image *)
PROCEDURE InqPrinterscan(handle: sINTEGER; VAR gSlice, gPage, size, page, div: sINTEGER);
(* vq_scan *)
PROCEDURE PrintText (handle: sINTEGER; REF string: ARRAY OF CHAR);
(* v_alpha_text *)
PROCEDURE SelectPalette (handle, palette: sINTEGER): sINTEGER;
(* vs_palette *)
PROCEDURE GenerateTone (handle, freq, time: sINTEGER);
(* v_sound *)
PROCEDURE ToneMultiflag (handle, action: sINTEGER);
(* vs_mute *)
PROCEDURE SetTabletaxisInch (handle, xres, yres: sINTEGER;
VAR xset, yset: sINTEGER);
(* vt_resolution *)
PROCEDURE SetTabletaxisLine (handle, xres, yres: sINTEGER;
VAR xset, yset: sINTEGER);
(* vt_axis *)
PROCEDURE SetTabletorigin (handle, x, y: sINTEGER);
(* vt_origin *)
PROCEDURE InqTabletorigin (handle: sINTEGER; VAR x, y: sINTEGER);
(* vq_tdimensions *)
PROCEDURE SetTabletalignment (handle, x, y: sINTEGER);
(* vt_alignment *)
PROCEDURE SetFilmtype (handle, index, light: sINTEGER);
(* vsp_film *)
PROCEDURE InqFilmname (handle: sINTEGER; VAR filmName: ARRAY OF CHAR);
(* vqp_filmname *)
PROCEDURE SetFilmexposure (handle, state: sINTEGER);
(* vsc_expose *)
PROCEDURE UpdateMetafile (handle, minX, minY, maxX, maxY: sINTEGER);
(* v_meta_extents *)
PROCEDURE WriteMetafile (handle, numIntin: sINTEGER; VAR intIn: ARRAY OF LOC;
numPtsin: sINTEGER; VAR ptsIn: ARRAY OF LOC);
(* v_write_meta *)
PROCEDURE PhysicalPagesize (handle, width, height: sINTEGER);
(* vm_pagesize *)
PROCEDURE CoordinateWindow (handle, llx, lly, urx, ury: sINTEGER);
(* vm_coords *)
PROCEDURE ChangeVdiFilename (handle: sINTEGER; REF fileName: ARRAY OF CHAR);
(* vm_filename *)
PROCEDURE SetLineoffset (handle, offset: sINTEGER);
(* v_offset *)
PROCEDURE InitSystemfont (handle: sINTEGER; VAR header: ARRAY OF LOC);
(* v_fontinit *)
(*-- VDI-Input -------------------------------------------------------*)
CONST Mouse = 1; (* Device-Typen *)
Cursor = 2;
FKey = 3;
Keyboard = 4;
CONST Request = 1; (* Input-Modus *)
Sample = 2;
PROCEDURE SetInputmode (handle, device, mode: sINTEGER): sINTEGER;
(* vsin_mode *)
PROCEDURE InputLocatorRQ (handle, x, y: sINTEGER; VAR xo, yo: sINTEGER;
VAR term: CHAR);
(* vrq_locator *)
PROCEDURE InputLocatorSM (handle, x, y: sINTEGER; VAR xo, yo: sINTEGER;
VAR term: CHAR): sBITSET;
(* vsm_locator *)
PROCEDURE InputValuatorRQ (handle, in: sINTEGER; VAR out: sINTEGER; VAR term: CHAR);
(* vrq_valuator *)
PROCEDURE InputValuatorSM (handle, in: sINTEGER; VAR out: sINTEGER;
VAR term: CHAR): sBITSET;
(* vsm_valuator *)
PROCEDURE InputChoiceRQ (handle, in: sINTEGER; VAR out: sINTEGER);
(* vrq_choice *)
PROCEDURE InputChoiceSM (handle: sINTEGER; VAR choice: sINTEGER ): sINTEGER;
(* vsm_choice *)
PROCEDURE InputStringRQ (handle, len: sINTEGER; echo: BOOLEAN;
VAR xy: ARRAY OF LOC;
VAR string: ARRAY OF CHAR);
(* vrq_string *)
PROCEDURE InputStringSM (handle, len: sINTEGER; echo: BOOLEAN;
VAR xy: ARRAY OF LOC;
VAR string: ARRAY OF CHAR): sINTEGER;
(* vsm_string *)
PROCEDURE SetMouseform (handle: sINTEGER; VAR form: ARRAY OF LOC);
(* vsc_form *)
PROCEDURE ShowCursor (handle: sINTEGER; reset: BOOLEAN);
(* v_show *)
PROCEDURE HideCursor (handle: sINTEGER);
(* v_hide *)
PROCEDURE SampleMouse (handle: sINTEGER; VAR stat: sBITSET; VAR x, y: sINTEGER);
(* vq_mouse *)
PROCEDURE ExTimerVector (handle: sINTEGER; new: SYSTEM.ADDRESS; VAR intervall: sINTEGER): SYSTEM.ADDRESS;
(* vex_timv *)
PROCEDURE ExButtonVector (handle: sINTEGER; new: SYSTEM.ADDRESS): SYSTEM.ADDRESS;
(* vex_butv *)
PROCEDURE ExMovementVector (handle: sINTEGER; new: SYSTEM.ADDRESS): SYSTEM.ADDRESS;
(* vex_motv *)
PROCEDURE ExCursorVector (handle: sINTEGER; new: SYSTEM.ADDRESS): SYSTEM.ADDRESS;
(* vex_curv *)
CONST KRSHIFT = Bit0; (* Tastatur-Status *)
KLSHIFT = Bit1;
KCTRL = Bit2;
KALT = Bit3;
KCAPS = Bit4; (* Fr VDI undokumentiert *)
PROCEDURE SampleKeyboard (handle: sINTEGER; VAR status: sBITSET);
(* vq_key_s *)
(*-- VDI-Inquire -----------------------------------------------------*)
CONST Workstation = 0;
Extended = 1;
PROCEDURE ExtendedInq (handle, wich: sINTEGER; VAR out: ARRAY OF LOC);
(* vq_extnd *)
PROCEDURE InqColor (handle, color: sINTEGER; set: BOOLEAN; VAR rgb: ARRAY OF LOC);
(* vq_color *)
PROCEDURE InqLine (handle: sINTEGER; VAR attrib: ARRAY OF LOC);
(* vql_attributs *)
PROCEDURE InqMarker (handle: sINTEGER; VAR attrib: ARRAY OF LOC);
(* vqm_attributs *)
PROCEDURE InqFill (handle: sINTEGER; VAR attrib: ARRAY OF LOC);
(* vqf_attributs *)
PROCEDURE InqText (handle: sINTEGER; VAR attrib: ARRAY OF LOC);
(* vqt_attributs *)
PROCEDURE InqTextextent (handle: sINTEGER; REF string: ARRAY OF CHAR;
VAR extent: ARRAY OF LOC);
(* vqt_extent *)
PROCEDURE InqCharwidth (handle: sINTEGER; ch: CHAR;
VAR width, left, right: sINTEGER): sINTEGER;
(* vqt_width *)
PROCEDURE InqFacename (handle, element: sINTEGER;
VAR name: ARRAY OF CHAR): sINTEGER;
(* vqt_name *)
PROCEDURE InqCellarray (handle: sINTEGER; VAR pxy: ARRAY OF LOC;
len, rows: sINTEGER;
VAR elUsed, rowsUsed, status: sINTEGER;
VAR colArray: ARRAY OF LOC);
(* vq_cellarray *)
PROCEDURE InqInputmode (handle, device: sINTEGER): sINTEGER;
(* vqin_mode *)
PROCEDURE InqFaceinfo (handle : sINTEGER;
VAR minADE, maxADE, maxWidth: sINTEGER;
VAR dist, effects: ARRAY OF LOC);
(* vqt_fontinfo *)
(*-- VDI-Output ------------------------------------------------------*)
PROCEDURE Polyline (handle, count: sINTEGER; pxy: ARRAY OF LOC);
(* v_pline *)
PROCEDURE Polymarker (handle, count: sINTEGER; pxy: ARRAY OF LOC);
(* v_pmarker *)
PROCEDURE Text (handle, x, y: sINTEGER; REF string: ARRAY OF CHAR);
(* v_gtext *)
PROCEDURE FilledArea (handle, count: sINTEGER; pxy: ARRAY OF LOC);
(* v_fillarea *)
PROCEDURE CellArray (handle, len, used, rows, mode: sINTEGER;
VAR pxy, color: ARRAY OF LOC);
(* v_cellarray *)
PROCEDURE ContourFill (handle, x, y, index: sINTEGER);
(* v_contourfill *)
PROCEDURE FillRectangle (handle: sINTEGER; pxy: ARRAY OF LOC);
(* vr_recfl *)
PROCEDURE Bar (handle: sINTEGER; pxy: ARRAY OF LOC);
(* v_bar *)
PROCEDURE Arc (handle, x, y, rad, beg, end: sINTEGER);
(* v_arc *)
PROCEDURE Pie (handle, x, y, rad, beg, end: sINTEGER);
(* v_pieslice *)
PROCEDURE Circle (handle, x, y, rad: sINTEGER);
(* v_circle *)
PROCEDURE Ellipse (handle, x, y, xrad, yrad: sINTEGER);
(* v_ellipse *)
PROCEDURE EllipticalArc (handle, x, y, xrad, yrad, beg, end: sINTEGER);
(* v_ellarc *)
PROCEDURE EllipticalPie (handle, x, y, xrad, yrad, beg, end: sINTEGER);
(* v_ellpie *)
PROCEDURE RoundedRectangle (handle: sINTEGER; pxy: ARRAY OF LOC);
(* v_rbox *)
PROCEDURE FilledRoundedRectangle (handle: sINTEGER; pxy: ARRAY OF LOC);
(* v_rfbox *)
PROCEDURE JustifiedText (handle, x, y, len, wspace, cspace: sINTEGER;
REF string: ARRAY OF CHAR);
(* v_justified *)
(*-- VDI-Raster ------------------------------------------------------*)
TYPE MFDB = RECORD
fdAddr: SYSTEM.ADDRESS;
fdW: sINTEGER;
fdH: sINTEGER;
fdWdwidth: sINTEGER;
fdStand: sINTEGER;
fdNplanes: sINTEGER;
fdR1: sINTEGER;
fdR2: sINTEGER;
fdR3: sINTEGER;
END;
PROCEDURE CopyRasterOpaque (handle, mode: sINTEGER;
pxy, srcMFDB, destMFDB: ARRAY OF LOC);
(* vro_cpyfm *)
PROCEDURE CopyRasterTransparent (handle, mode, cSet, cNotset: sINTEGER;
pxy, srcMFDB, destMFDB: ARRAY OF LOC);
(* vrt_cpyfm *)
PROCEDURE TransformForm (handle: sINTEGER; VAR srcMFDB, destMFDB: ARRAY OF LOC);
(* vr_trnfm *)
PROCEDURE GetPixel (handle, x, y: sINTEGER; VAR index: sINTEGER): BOOLEAN;
(* v_get_pixel *)
PROCEDURE InitVDI;
(* Init-Prozedur. Wird im Modulkrper ausgefhrt und braucht nicht weiter
* beachtet zu werden.
*)
END MagicVDI.